package com.bcinfo.iccard.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.bcinfo.iccard.model.ToMerchantDaliyEarningsDetail;

public interface ToMerchantDaliyEarningsDetailMapper
{
    int getLastSelectTotalNum();

    int deleteByPrimaryKey(Long merchantDaliyEarningsDetailId);

    int insert(ToMerchantDaliyEarningsDetail record);

    int insertSelective(ToMerchantDaliyEarningsDetail record);

    ToMerchantDaliyEarningsDetail selectByPrimaryKey(Long merchantDaliyEarningsDetailId);

    int updateByPrimaryKeySelective(ToMerchantDaliyEarningsDetail record);

    int updateByPrimaryKey(ToMerchantDaliyEarningsDetail record);

    List<ToMerchantDaliyEarningsDetail> selectByMerchantAndDate(@Param("merchantCode") String merchantCode,
            @Param("day") String date, @Param("firstIndex") int firstIndex, @Param("maxRows") int maxRows);

    List<ToMerchantDaliyEarningsDetail> selectByMerchantAndMonth(@Param("merchantCode") String merchantCode,
            @Param("month") String month, @Param("firstIndex") int firstIndex, @Param("maxRows") int maxRows);

    List<ToMerchantDaliyEarningsDetail> selectByMerchantAndQuarter(@Param("merchantCode") String sellerCode,
            @Param("startMonth") String start, @Param("endMonth") String end, @Param("firstIndex") int i,
            @Param("maxRows") int pagesize);

    List<ToMerchantDaliyEarningsDetail> selectByMerchantAndDays(@Param("merchantCode") String sellerCode,
            @Param("beginDay") String beginTime, @Param("endDay") String endTime, @Param("firstIndex") int i,
            @Param("maxRows") int pageSize);

    List<ToMerchantDaliyEarningsDetail> selectSumByMerchantAndDays(@Param("merchantCode") String sellerCode,
            @Param("beginDay") String beginTime, @Param("endDay") String endTime);

    ToMerchantDaliyEarningsDetail selectSumByMerchantsAndDays(@Param("merchants") String[] sellerIds,
            @Param("beginDay") String beginTime, @Param("endDay") String endTime);
}